
  function runHomeTests()
  {
//      fireunit.ok(true, "Passing test result");
//fireunit.ok(false, "Failing test result.");
//fireunit.compare("expected data", "expected data",
//    "Passing verification of expected and actual input.");
//fireunit.compare("<div>expected</div>", "<div>actual</div>",
//    "Failing verification of expected and actual input.");

///Click Registration Button and Check Result
fireunit.click(  $("#regButton") );
fireunit.compare(true,$("#dialog-box-registration").is(":visible"), "Check if registration dialog has opened after clicking the registration button.");

///Click Register Button and check Validation
var  btnRegister = jQuery('.ui-dialog-buttonpane').find('button:contains("Register")');
fireunit.click(  btnRegister );
fireunit.compare("Error. Length of your first name must be between 2 and 20.",$(".errorMessageDiv").html() , "Check Validation Error when Registration Button is pressed (No Elements are filled in)");


  input = document.getElementById("firstName");
  fireunit.key(input, "s" );
  fireunit.click(  btnRegister );
fireunit.compare("Error. Length of your first name must be between 2 and 20.",$(".errorMessageDiv").html() , "Check Length Validation of frist name (length)");

input = document.getElementById("firstName");
fireunit.key(input, ";" );
fireunit.click(  btnRegister );
fireunit.compare("Error. The first name field only allows alphanumeric characters (a-z 0-9).",$(".errorMessageDiv").html() , "Check Length Validation of first name (aplha numeric)");

 $("#firstName").val("salman");
// input = document.getElementById("firstName");
//fireunit.key(input, ";" );
fireunit.click(  btnRegister );
fireunit.compare("Error. Length of your last name must be between 2 and 20.",$(".errorMessageDiv").html() , "Check if all validation passes for first name (aplha numeric)");


 //$("#firstName").val("salman");
 input = document.getElementById("lastName");
fireunit.key(input, "n" );
fireunit.click(  btnRegister );
fireunit.compare("Error. Length of your last name must be between 2 and 20.",$(".errorMessageDiv").html() , "Check Length Validation of last name (length)");

 input = document.getElementById("lastName");
fireunit.key(input, ";" );
fireunit.click(  btnRegister );
fireunit.compare("Error. The last name field only allows alphanumeric characters (a-z 0-9).",$(".errorMessageDiv").html() , "Check Validation of last name (aplpha numeric)");


$("#lastName").val("noor");
fireunit.click(  btnRegister );
fireunit.compare("Error. Enter a valid email address, eg. yourname@wits.ac.za.",$(".errorMessageDiv").html() , "Check all validation passes of last name (aplpha numeric & length)");
//

 $("#emailAddress").val("salman.noor@wats");
fireunit.click(  btnRegister );
fireunit.compare("Error. Enter a valid email address, eg. yourname@wits.ac.za.",$(".errorMessageDiv").html() , "Check email validation passes of email address (email)");
//
$("#emailAddress").val("salman.noor@wits.ac.za");
fireunit.click(  btnRegister );
fireunit.compare("Error. Length of your user name must be between 1 and 20.",$(".errorMessageDiv").html() , "Check all validation passes of email address (email)");

 input = document.getElementById("userName");
fireunit.key(input, ";" );
fireunit.click(  btnRegister );
fireunit.compare("Error. The user name field only allows alphanumeric characters (a-z 0-9).",$(".errorMessageDiv").html() , "Check alphanmueric validation passes of user name (alpha numeric)");

$("#userName").val("s");
fireunit.click(  btnRegister );
fireunit.compare("Error. Length of your password must be between 1 and 20.",$(".errorMessageDiv").html() , "Check length validation passes of password (password length)");


 input = document.getElementById("passwordField");
fireunit.key(input, ";" );
fireunit.click(  btnRegister );
fireunit.compare("Error. The password field only allows alphanumeric characters (a-z 0-9).",$(".errorMessageDiv").html() , "Check alphanumeric validation pass of password (alpha numeric)");


$("#passwordField").val("n");
fireunit.click(  btnRegister );
fireunit.compare("Error. Length of your password must be between 1 and 20.",$(".errorMessageDiv").html() , "Check length validation pass of repeat password (length)");

 input = document.getElementById("repeatPasswordField");
fireunit.key(input, "q" );
fireunit.click(  btnRegister );
fireunit.compare("Error. Password fields do not match.",$(".errorMessageDiv").html() , "Check repeat password validation pass of repeat password (check same password)");

$("#repeatPasswordField").val("n");
 fireunit.click(  btnRegister );


//    inputButton =  $("#loginButton");
//  //  input = document.getElementById('loginButton')
//fireunit.click(  inputButton );
//
//  fireunit.compare("Error. Field is Empty.",$(".errorMessageDiv").html() , "Click displays Hello World!");
//  input = document.getElementById("loginName");
//  fireunit.key(input, "s" );
//fireunit.click(  inputButton );
//   fireunit.compare("Error. Field is Empty.", $(".errorMessageDiv").html(), "Click displays Hello World!");

  //   input = document.getElementsByTagName("input")[1];
 // fireunit.key( input, "n" );
//fireunit.click(  inputButton );

//fireunit.key(lg , "s" );
//fireunit.click(  input );
  //var result = $(".errorMessageDiv").html();
  //
//  fireunit.key( $("#loginName"), "n" );
//
//  fireunit.click(  input );
//    fireunit.compare("2", $("#loginResponseDiv").html(), "Click displays Hello World!");

        // Assert
       // fireunit.ok(result === 4, "Test add positive numbers");
// Wait for asynchronous operation.
setTimeout(function(){
    // Finish test
   
fireunit.compare("Error. User Name Already Exists. Please Select another User Name",$(".errorMessageDiv").html() , "Test AJAX functionality for registration Handler.");
    fireunit.testDone();
}, 1000);
  }
